package com.mz.ozy.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mz.ozy.R;
import com.mz.ozy.bean.ShogBean;
import com.mz.ozy.utils.glideUtils.GlideUtils;

import java.util.List;

/**
 *
 */

public class OrganicAdapter extends BaseQuickAdapter<ShogBean.PageBean.PageItemsBean, BaseViewHolder> {

    public OrganicAdapter(List<ShogBean.PageBean.PageItemsBean> data) {
        super(R.layout.item_organic_list, data);

    }

    @Override
    protected void convert(BaseViewHolder helper, ShogBean.PageBean.PageItemsBean item) {
//        JzvdStd videoImage = helper.getView(R.id.video_image);
//        String proxyUrl = WpkApp.getProxy(mContext).getProxyUrl(item.getImg1());
//        videoImage.setUp(proxyUrl, "");
        ImageView iv_image = helper.getView(R.id.iv_image);
        GlideUtils.loadRoundImg(mContext, iv_image, item.getImg1(), R.mipmap.default_main_banner, 4);
        LinearLayout start_layout = helper.getView(R.id.start_layout);
//        if (item.getSctype() == 0) {
        start_layout.setVisibility(View.GONE);
//        } else {
//            start_layout.setVisibility(View.VISIBLE);
//        }
//        helper.setText(R.id.tv_title, item.getTitle());
//        helper.setText(R.id.tv_time, item.getCreated());
    }


}
